
<div class="searchBar">
    <table class="searchContent">
        <tr>
	        <input type="hidden" name="query_mode" value="{{query_mode}}"/>
            {% if query_mode in ('basic','product') %}
            <td> 开始：
                <input name="start" class="date textInput readonly valid" readonly="true" type="text" value="{{start}}">
            </td>
            <td> 结束：
                <input name="date" class="date textInput readonly valid" readonly="true" type="text" value="{{date}}">
            </td>
            {% else %}
            <td> 日期：
                <input name="date" class="date textInput readonly valid" readonly="true" type="text" value="{{date}}">
            </td>
            {% end %}

            {% if query_mode not in ['fact','business'] %}
            <td> 厂商：
				<select name="factory_id" class="required">
                    {% if (current_user.is_root and query_mode == 'product') or current_user['name'] == 'wangliang' %}
					<option value="-1">不限</option>
                    {% end %}
                    {% for i in factory_list %}
					<option value="{{i.id}}" {% if factory_id == i.id %}selected{% end %}>{{i.name}}</option>
                    {% end %}
				</select>
                <input class="required" name="factory_name" type="text" postField="factory_name"
                            suggestFields="factory_name" suggestUrl="factory/search?resource={{query_mode}}" lookupGroup=""/>
            </td>
            {% end %}
            {% if query_mode in ('basic') %}
             <td> ireader：
                <select name="version_name">
                    <option value="">不限</option>
                    <option value="ireader_1__6" {% if version_name=='ireader_1.6' %}selected{% end %}>1.6</option>
                    <option value="ireader_1__7" {% if version_name=='ireader_1.7' %}selected{% end %}>1.7</option>
                    <option value="ireader_1__8" {% if version_name=='ireader_1.8' %}selected{% end %}>1.8</option>
                    <option value="ireader_2__0" {% if version_name=='ireader_2.0' %}selected{% end %}>2.0</option>
                    <option value="ireader_2__1" {% if version_name=='ireader_2.1' %}selected{% end %}>2.1</option>
                    <option value="ireader_2__2" {% if version_name=='ireader_2.2' %}selected{% end %}>2.2</option>
                    <option value="ireader_2__3" {% if version_name=='ireader_2.3' %}selected{% end %}>2.3</option>
                    <option value="ireader_2__4" {% if version_name=='ireader_2.4' %}selected{% end %}>2.4</option>
                    <option value="ireader_2__6" {% if version_name=='ireader_2.6' %}selected{% end %}>2.6</option>
                    <option value="ireader_2__7" {% if version_name=='ireader_2.7' %}selected{% end %}>2.7</option>
                    <option value="ireader_3__0" {% if version_name=='ireader_3.0' %}selected{% end %}>3.0</option>
                    <option value="ireader_3__1" {% if version_name=='ireader_3.1' %}selected{% end %}>3.1</option>
                    <option value="ireader_3__2" {% if version_name=='ireader_3.2' %}selected{% end %}>3.2</option>
                </select>
            </td>
            {% end %}
            {% if query_mode not in ('fact','business') %}
            <td>
                 机型：
                <input type="text"  name="product_name"  size="12" value="{{product_name}}"/> 
            </td>
            {% end %}
            {% if query_mode in ('product') %}
            <td><a class="icon" href="factstat?query_mode=product&action=export" target="dwzExport" targettype="navTab" title="导出多日机型数据可能非常慢，确实要导出这些记录吗?"><span>导出EXCEL</span></a></td>
            {% end %}
            <td>
                <div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div>
            </td>
        </tr>
    </table>
</div>

